﻿using BIS.Utility.DAL.DataMapper;
using BIS.Utility.Converter;

namespace BIS.Portal.Modules.CMS.Entity
{
    public class ClientCmsMediaEnity : IEntity
    {

        #region Private member

        private int _media_id;
        private string _media_title;
        private string _media_description;
        private int _media_type;
        private string _media_src;
        private string _media_link;
        private string _media_thumbnails;
        private int _language_in_use_id;

        #endregion

        #region Pulbic contructor

        public ClientCmsMediaEnity()
        {
        }

        public ClientCmsMediaEnity(int mediaId, string mediaTitle, string mediaDescription, int mediaType, string mediaSrc, string mediaLink, string mediaThumbnails, int languageInUseId)
        {
            _media_id = mediaId;
            _media_title = mediaTitle;
            _media_description = mediaDescription;
            _media_type = mediaType;
            _media_src = mediaSrc;
            _media_link = mediaLink;
            _media_thumbnails = mediaThumbnails;
            _language_in_use_id = languageInUseId;
        }

        #endregion

        #region Pulbic properties

        public int MediaId
        {
            get { return _media_id; }
            set { _media_id = value; }
        }

        public string MediaTitle
        {
            get { return _media_title; }
            set { _media_title = value; }
        }

        public string MediaDescription
        {
            get { return _media_description; }
            set { _media_description = value; }
        }

        public int MediaType
        {
            get { return _media_type; }
            set { _media_type = value; }
        }

        public string MediaSrc
        {
            get { return _media_src; }
            set { _media_src = value; }
        }

        public string MediaLink
        {
            get { return _media_link; }
            set { _media_link = value; }
        }

        public string MediaThumbnails
        {
            get { return _media_thumbnails; }
            set { _media_thumbnails = value; }
        }

        public int LanguageInUseId
        {
            get { return _language_in_use_id; }
            set { _language_in_use_id = value; }
        }

        #endregion

        #region Implement From IEntity Member

        public void Fill(System.Data.IDataReader reader)
        {
            MediaId = Functions.GetInt(reader["media_id"]);
            MediaTitle = Functions.GetString(reader["media_title"]);
            MediaDescription = Functions.GetString(reader["media_description"]);
            MediaType = Functions.GetInt(reader["media_type"]);
            MediaSrc = Functions.GetString(reader["media_src"]);
            MediaLink = Functions.GetString(reader["media_link"]);
            MediaThumbnails = Functions.GetString(reader["media_thumbnails"]);
            LanguageInUseId = Functions.GetInt(reader["language_in_use_id"]);
        }
        #endregion

    }
}
